/* 以下从modules模块引入-begin
---------------------------------------------------------------- */
// *********************************坐席端-接口--begin*********************************

import $http from '../../servers/http';
import { Result } from 'seats/schema/Result';
import { RobotInfo, RobotsRequest } from 'seats/schema/Robots';
import { TTSInfo } from 'seats/schema/TTS';

/**签入签出 */
export * from './modules/CheckInOut';
/**我的录音 */
export * from './modules/SoundManage';
export * from './modules/Task';
// 通话记录
export * from './modules/CallRecord';

// 登录，个人资料-模块
export * from './modules/Login';

export * from './modules/HomePage';

//  *********************************坐席端-接口--end*********************************
/**
 * 查询在线的机器人-坐席端
 * @param data
 */
export const getSeatOnlineRobot = (data: RobotsRequest): Promise<Result<RobotInfo[]>> => {
  return $http.get({
    url: '/robotmanage/robots/seats/online',
    data,
  });
};

// *************************常用接口*************************

/**查询TTS厂商列表 */
export const getTTSList = (data: {
  pageSize: number;
  pageNo: number;
  ttsManufacturerName?: string;
}): Promise<Result<TTSInfo[]>> => {
  return $http.get({
    url: '/icms/ttsmanufacturermanage/ttsmanufacturers',
    data,
  });
};

/**根据TTS厂商id查询name */
export const getTTSInfo = (id: number): Promise<Result<TTSInfo>> => {
  return $http.get({
    url: `/icms/ttsmanufacturermanage/ttsmanufacturers/${id}`,
  });
};
